package cn.akwangl.design.pattern.behavioral.observerpattern.v4;

import java.util.Observer;

/**
 * 观察者模式#v4.
 *
 * @author youyongkun
 * @date 2021/12/6 16:52
 */
public class CrudeOilFutures {
    public static void main(String[] args) {
        OilFutures oil = new OilFutures();
        //多方
        Observer bull = new Bull();
        //空方
        Observer bear = new Bear();
        oil.addObserver(bull);
        oil.addObserver(bear);
        oil.setPrice(10);
        oil.setPrice(-8);
    }
}